# /usr/bin/python3
# coding=utf-8
# @Time:2025/8/6 20:49
# @Author: cc

# 如何进行代码封装

class LoginBase :
    def login_input(self, input_placeholder) :
        '''
        登录用户名、密码输入框中的文字
        :param input_placeholder:
        :return:
        '''

        return f"//input[@placeholder='{input_placeholder}']"

    def login_button(self, button_name) :
        '''
        登录按钮
        :param button_name:
        :return:
        # '''
        return f"//span[text()='{button_name}']"

    def login_success(self) :
        '''
        登录成功提示
        :return:
        '''
        return "//p[text()='登录成功']"


if __name__ == '__main__' :
    print (LoginBase ( ).login_input ('密码'))
    print (LoginBase ( ).login_button ('登录'))
